import 'dart:ui';
import 'package:flutter/material.dart';
import 'package:flutter_jd/pages/tabbar/my/controller.dart';
import 'package:get/get_state_manager/get_state_manager.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

// 钱包区域
class MyMoneyWrap extends GetWidget<MyController> {
  @override
  Widget build(BuildContext context) {
    return Container(
      height: 80.h,
      margin: EdgeInsets.only(left: 10.w, right: 10.w, top: 12.h),
      decoration: BoxDecoration(
        color: Colors.white,
        borderRadius: BorderRadius.circular(10.r),
      ),
      child: Row(
        children: List.generate(
          controller.moneyList.length,
          (index) => Expanded(
              child: Container(
            child: Column(
              mainAxisAlignment: MainAxisAlignment.center,
              children: [
                Container(
                  child: Text(
                    controller.moneyList[index]['title'],
                    style: TextStyle(
                      fontSize: 18.sp,
                      fontWeight: FontWeight.w500,
                    ),
                  ),
                ),
                Container(
                  margin: EdgeInsets.only(top: 6.h),
                  child: Text(
                    controller.moneyList[index]['name'],
                    style: TextStyle(fontSize: 10.sp),
                  ),
                ),
                Container(
                  margin: EdgeInsets.only(top: 6.h),
                  child: Text(
                    controller.moneyList[index]['subText'],
                    style: TextStyle(color: Color(0xFF999999), fontSize: 10.sp),
                  ),
                ),
              ],
            ),
          )),
        ),
      ),
    );
  }
}
